package day10.Stream;

import java.util.ArrayList;

public class Lian04 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 1; i <= 10; i++) {
            list.add(i);
        }
        list.stream().filter(number -> number % 2 == 0)
                .forEach(number -> System.out.println(number));
        System.out.println("----------");
        for (Integer integer : list) {
            System.out.println(integer);
        }
    }
}
